// Created by carolsail

const { ccclass, property } = cc._decorator;

@ccclass
export default class GbzBaseLayer extends cc.Component {

    show() {
        this.node.active = true;
    }

    hide() {
        this.node.active = false;
    }

    zoom(node: cc.Node, bool: boolean = true) {
        if (bool) {
            // zoomIn
            node.setScale(1.5)
            const act = cc.scaleTo(0.3, 1)
            cc.tween(node).then(act).start()
        } else {
            // zoomOut
            node.setScale(0.5)
            const act = cc.scaleTo(0.3, 1)
            cc.tween(node).then(act).start()
        }
    }
}
